#
# Makefile for mrouted-snmpd
#
# If USEMIB is not defined, /etc/*.conf files used by snmpd MUST use numeric
# OIDs only (no symbolic names).  This is so that snmpd or mrouted will work
# even without a /etc/mib.txt.
#TARG=	snmpd 
#CFLAGS=-g -I./lib ${INCLUDES} -DDEBUG -DUSEMIB
SNMPDLIBS=	../snmplib/libsnmp.a
TARG=	libsnmpd.a
#CFLAGS=-O -I../snmplib ${INCLUDES} -DDEBUG -DMROUTED
CFLAGS=-g -I../snmplib ${INCLUDES} -DDEBUG -DMROUTED
#CFLAGS=-O -I../snmplib ${INCLUDES} -DDEBUG
CC =cc
all: $(TARG)

OBJS= snmpd.o kernel.o snmp_agent.o snmp_vars.o snmp_var_route.o party_vars.o context_vars.o acl_vars.o view_vars.o view_parse.o alarm.o event.o route_write.o

libsnmpd.a: config.h ${OBJS}
	ar r libsnmpd.a ${OBJS}
	ranlib libsnmpd.a

snmpd:	config.h ${OBJS}
	${CC} -o $@ ${OBJS} ${SNMPDLIBS}

config.h:
	./Configure

clean:
	rm -f *.o ${TARG}

install:
	cp ${TARG} ../bin
